/* Layout */
import Layout from '@/layout';
import LayoutContainer from '@/layout/router-view.vue';

export default {
  path: '/member',
  name: 'member',
  component: Layout,
  redirect: 'noRedirect',
  meta: { title: '创作中心', icon: 'icon_memo', roles: ['米米法'] },
  children: [
    {
      path: 'data-up',
      meta: { title: '数据中心', icon: 'dashboard' }
    },
    {
      path: 'upload',
      redirect: 'noRedirect',
      component: () => import('@/views/miva-member/upload/index.vue'),
      meta: { title: '投稿', icon: 'form' },
      children: [
        {
          path: '/',
          hidden: true,
          redirect: 'audio'
        },
        {
          path: 'audio',
          name: 'audioEdit',
          hidden: true,
          component: () => import('@/views/editAudioArchive'),
          meta: { title: '音频投稿', animation: false, activeMenu: '/member/upload' }
        }, {
          path: 'text',
          hidden: true,
          component: () => import('@/views/miva-member/upload/text/index.vue'),
          meta: { title: '专题投稿', animation: false, activeMenu: '/member/upload' }
        }, {
          path: 'blog',
          hidden: true,
          component: () => import('@/views/miva-member/upload/blog/index.vue'),
          meta: { title: 'blog发布', animation: false, activeMenu: '/member/upload' }
        }]
    },
    {
      path: 'upload-manager',
      alwaysShow: true,
      component: LayoutContainer,
      redirect: 'noRedirect',
      meta: { title: '内容管理', icon: 'tree' },
      children: [{
        path: 'article',
        redirect: 'noRedirect',
        meta: { title: '稿件管理', icon: 'icon_workfile_line' },
        component: () => import('@/views/miva-member/upload-manager/article/index.vue'),
        children: [{
          path: '/',
          hidden: true,
          redirect: 'audios'
        }, {
          path: 'audios',
          name: 'audiosList',
          hidden: true,
          component: () => import('@/views/miva-member/upload-manager/article/audios/index.vue'),
          meta: { animation: false, activeMenu: '/member/upload-manager/article' }
        }, {
          path: 'text',
          hidden: true,
          component: () => import('@/views/miva-member/upload-manager/article/text/index.vue'),
          meta: { animation: false, activeMenu: '/member/upload-manager/article', roles: ['九条米法'] }
        }]
      }, {
        path: 'examine',
        redirect: 'examine/audios',
        meta: { title: '审核管理', icon: '提案审批', roles: ['九条米法'] },
        component: () => import('@/views/miva-member/upload-manager/examine/index.vue'),
        children: [{
          path: 'audios',
          hidden: true,
          component: () => import('@/views/miva-member/upload-manager/examine/audios/index.vue'),
          meta: { animation: false, activeMenu: '/member/upload-manager/examine' }
        }, {
          path: 'text',
          hidden: true,
          component: () => import('@/views/miva-member/upload-manager/article/text/index.vue'),
          meta: { animation: false, activeMenu: '/member/upload-manager/examine' }
        }]
      }]
    },
    {
      path: 'inter-active',
      alwaysShow: true,
      component: LayoutContainer,
      redirect: 'noRedirect',
      meta: { title: '互动管理', icon: 'user' },
      children: [{
        path: 'comment',
        meta: { title: '评论管理', icon: 'example' }
      }]
    }
  ]
};
